package interfacesSIAB;

import java.awt.BorderLayout;
import javax.swing.JPanel;
import javax.swing.JFrame;
import java.awt.Dimension;
import java.awt.Rectangle;
import java.awt.Color;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JTextField;
import javax.swing.BorderFactory;
import javax.swing.border.TitledBorder;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class BuscarProducto extends JFrame {

	private static final long serialVersionUID = 1L;
	private JPanel jContentPane = null;
	private JPanel jPanel1 = null;
	private JButton buscar1 = null;
	private JLabel jLabel = null;
	private JTextField jTextField = null;
	private JPanel jPanel2 = null;
	private JLabel Nombre = null;
	private JLabel jLabel1 = null;
	private JTextField NombreProducto = null;
	private JTextField Codigoproducto = null;
	private JLabel jLabel11 = null;
	private JLabel TipoProducto = null;
	private JTextField descripcionProducto = null;
	private JTextField tipoProducto = null;
	private JButton Actualizar = null;
	private JButton Cancelar = null;

	/**
	 * This is the default constructor
	 */
	public BuscarProducto() {
		super();
		initialize();
	}

	/**
	 * This method initializes this
	 * 
	 * @return void
	 */
	private void initialize() {
		this.setSize(371, 437);
		this.setResizable(false);
		this.setContentPane(getJContentPane());
		this.setTitle("Buscar Producto");
	}

	/**
	 * This method initializes jContentPane
	 * 
	 * @return javax.swing.JPanel
	 */
	private JPanel getJContentPane() {
		if (jContentPane == null) {
			jContentPane = new JPanel();
			jContentPane.setLayout(null);
			jContentPane.add(getJPanel1(), null);
			jContentPane.add(getJPanel2(), null);
			jContentPane.add(getActualizar(), null);
			jContentPane.add(getCancelar(), null);
		}
		return jContentPane;
	}

	/**
	 * This method initializes jPanel1	
	 * 	
	 * @return javax.swing.JPanel	
	 */
	private JPanel getJPanel1() {
		if (jPanel1 == null) {
			jLabel = new JLabel();
			jLabel.setBounds(new Rectangle(9, 18, 53, 16));
			jLabel.setText("Codigo");
			jPanel1 = new JPanel();
			jPanel1.setLayout(null);
			jPanel1.setBounds(new Rectangle(7, 23, 334, 61));
			jPanel1.setBackground(new Color(244, 206, 9));
			jPanel1.setBorder(BorderFactory.createLineBorder(Color.orange, 1));
			jPanel1.add(getBuscar1(), null);
			jPanel1.add(jLabel, null);
			jPanel1.add(getJTextField(), null);
		}
		return jPanel1;
	}

	/**
	 * This method initializes buscar1	
	 * 	
	 * @return javax.swing.JButton	
	 */
	private JButton getBuscar1() {
		if (buscar1 == null) {
			buscar1 = new JButton();
			buscar1.setBounds(new Rectangle(230, 15, 82, 24));
			buscar1.setText("Buscar");
		}
		return buscar1;
	}

	/**
	 * This method initializes jTextField	
	 * 	
	 * @return javax.swing.JTextField	
	 */
	private JTextField getJTextField() {
		if (jTextField == null) {
			jTextField = new JTextField();
			jTextField.setBounds(new Rectangle(102, 17, 99, 20));
		}
		return jTextField;
	}

	/**
	 * This method initializes jPanel2	
	 * 	
	 * @return javax.swing.JPanel	
	 */
	private JPanel getJPanel2() {
		if (jPanel2 == null) {
			TipoProducto = new JLabel();
			TipoProducto.setBounds(new Rectangle(19, 167, 105, 16));
			TipoProducto.setText("  Tipo de Producto");
			jLabel11 = new JLabel();
			jLabel11.setBounds(new Rectangle(23, 122, 91, 21));
			jLabel11.setText("  Descripcion");
			jLabel1 = new JLabel();
			jLabel1.setBounds(new Rectangle(20, 82, 79, 20));
			jLabel1.setText("   Codigo");
			Nombre = new JLabel();
			Nombre.setBounds(new Rectangle(21, 44, 79, 16));
			Nombre.setText("   Nombre");
			jPanel2 = new JPanel();
			jPanel2.setLayout(null);
			jPanel2.setBounds(new Rectangle(10, 103, 333, 230));
			jPanel2.setBorder(BorderFactory.createTitledBorder(BorderFactory.createMatteBorder(1, 1, 1, 1, Color.orange), "Datos del Producto", TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, new Font("Dialog", Font.BOLD, 12), new Color(51, 51, 51)));
			jPanel2.add(Nombre, null);
			jPanel2.add(jLabel1, null);
			jPanel2.add(getNombreProducto(), null);
			jPanel2.add(getCodigoproducto(), null);
			jPanel2.add(jLabel11, null);
			jPanel2.add(TipoProducto, null);
			jPanel2.add(getDescripcionProducto(), null);
			jPanel2.add(getTipoProducto(), null);
		}
		return jPanel2;
	}

	/**
	 * This method initializes NombreProducto	
	 * 	
	 * @return javax.swing.JTextField	
	 */
	private JTextField getNombreProducto() {
		if (NombreProducto == null) {
			NombreProducto = new JTextField();
			NombreProducto.setBounds(new Rectangle(141, 45, 97, 20));
		}
		return NombreProducto;
	}

	/**
	 * This method initializes Codigoproducto	
	 * 	
	 * @return javax.swing.JTextField	
	 */
	private JTextField getCodigoproducto() {
		if (Codigoproducto == null) {
			Codigoproducto = new JTextField();
			Codigoproducto.setBounds(new Rectangle(141, 80, 98, 20));
		}
		return Codigoproducto;
	}

	/**
	 * This method initializes descripcionProducto	
	 * 	
	 * @return javax.swing.JTextField	
	 */
	private JTextField getDescripcionProducto() {
		if (descripcionProducto == null) {
			descripcionProducto = new JTextField();
			descripcionProducto.setBounds(new Rectangle(141, 117, 98, 20));
		}
		return descripcionProducto;
	}

	/**
	 * This method initializes tipoProducto	
	 * 	
	 * @return javax.swing.JTextField	
	 */
	private JTextField getTipoProducto() {
		if (tipoProducto == null) {
			tipoProducto = new JTextField();
			tipoProducto.setBounds(new Rectangle(144, 163, 93, 20));
		}
		return tipoProducto;
	}

	/**
	 * This method initializes Actualizar	
	 * 	
	 * @return javax.swing.JButton	
	 */
	private JButton getActualizar() {
		if (Actualizar == null) {
			Actualizar = new JButton();
			Actualizar.setBounds(new Rectangle(48, 363, 91, 26));
			Actualizar.setText("Aceptar");
		}
		return Actualizar;
	}

	/**
	 * This method initializes Cancelar	
	 * 	
	 * @return javax.swing.JButton	
	 */
	private JButton getCancelar() {
		if (Cancelar == null) {
			Cancelar = new JButton();
			Cancelar.setBounds(new Rectangle(202, 364, 94, 25));
			Cancelar.setText("Salir");
			
Cancelar.addActionListener(new ActionListener() {
				
				@Override
				public void actionPerformed(ActionEvent e) {
					
					dispose();
				}
			});
			
			
			
			
		}
		return Cancelar;
	}

}  //  @jve:decl-index=0:visual-constraint="10,10"
